home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Classicos / Pac Man white.swf / scripts / DefineSprite_63 / frame_2 / DoAction.as
Encoding:
Text File  |  2006-06-13  |  2.1 KB  |  129 lines

  1. count++;
  2. if(count < 86)
  3. {
  4.    Pac._x += 4;
  5.    i = 0;
  6.    while(i < 4)
  7.    {
  8.       if(count > 6 * i + 10)
  9.       {
  10.          G[i]._x += 4;
  11.       }
  12.       i++;
  13.    }
  14. }
  15. else if(count == 86)
  16. {
  17.    Pill._visible = false;
  18.    Pac._rotation = 0;
  19.    i = 0;
  20.    while(i < 4)
  21.    {
  22.       G[i].gotoAndStop(2);
  23.       this["c" + i].setRGB(50344959);
  24.       i++;
  25.    }
  26. }
  27. else if(count < 172)
  28. {
  29.    Pac._x -= 4;
  30.    i = 0;
  31.    while(i < 4)
  32.    {
  33.       with(G[i])
  34.       {
  35.          _x -= 2;
  36.          if(_visible && Shape.Hit.hitTest(Pac.Hit))
  37.          {
  38.             _visible = false;
  39.             GK._x = _x;
  40.             GK.kval *= 2;
  41.          }
  42.       }
  43.       i++;
  44.    }
  45.    if(count == 155)
  46.    {
  47.       GK.kval = "";
  48.    }
  49. }
  50. else if(count == 172)
  51. {
  52.    i = 0;
  53.    while(i < 4)
  54.    {
  55.       this["c" + i].setRGB(col[i]);
  56.       tellTarget(G[i])
  57.       {
  58.          gotoAndStop(1);
  59.          Eyes.gotoAndStop(2);
  60.          _visible = true;
  61.          _X = -200;
  62.       }
  63.       i++;
  64.    }
  65.    tellTarget("GK")
  66.    {
  67.       _X = -16;
  68.       _xscale = _xscale * 2;
  69.       _yscale = _yscale * 2;
  70.    }
  71. }
  72. else if(count < 580)
  73. {
  74.    i = 0;
  75.    while(i < 4)
  76.    {
  77.       if(count == 244 + 90 * i)
  78.       {
  79.          ck.setRGB(col[i]);
  80.          if(i == 0)
  81.          {
  82.             GK.kval = "\"BLINKY\"";
  83.          }
  84.          if(i == 1)
  85.          {
  86.             GK.kval = "\"PINKY\"";
  87.          }
  88.          if(i == 2)
  89.          {
  90.             GK.kval = "\"INKEY\"";
  91.          }
  92.          if(i == 3)
  93.          {
  94.             GK.kval = "\"CLYDE\"";
  95.          }
  96.       }
  97.       else if(count > 180 + 90 * i && count < 244 + 90 * i || count > 270 + 90 * i && count < 307 + 90 * i)
  98.       {
  99.          G[i]._x += 4;
  100.          GK.kval = "";
  101.       }
  102.       i++;
  103.    }
  104. }
  105. else
  106. {
  107.    tellTarget("GK")
  108.    {
  109.       _X = -200;
  110.       _xscale = 100;
  111.       _yscale = 100;
  112.       kval = 100;
  113.    }
  114.    i = 0;
  115.    while(i < 4)
  116.    {
  117.       G[i]._x = -200;
  118.       i++;
  119.    }
  120.    tellTarget("Pac")
  121.    {
  122.       _X = -196;
  123.       _rotation = 180;
  124.    }
  125.    ck.setRGB(16777215);
  126.    Pill._visible = true;
  127.    count = 0;
  128. }
  129.